//
//  PaiGoodsInfoView.m
//  PPDL
//
//  Created by 王洋 on 2019/9/11.
//  Copyright © 2019 王洋. All rights reserved.
//

#import "PaiGoodsInfoView.h"

@implementation PaiGoodsInfoView

- (void)fillHeadWithModel:(DetailGoodInfoModel *)model {
    
    [self.itemMainImage sd_setImageWithURL:[NSURL URLWithString:model.itemImageArray.firstObject] placeholderImage:[UIImage imageNamed:@"placeholder_rect"] options:SDWebImageRetryFailed];
    
    self.itemGoodsTitle.text = [NSString stringWithFormat:@"%@",model.itemGoodName];
    self.itemGoodsStartPrice.text = [NSString stringWithFormat:@"起拍价：¥ %@",[Utilities changeDoubleToString:model.itemStartPrice]];
    
    //10月5日 改为封顶价
    self.itemGoodsMarketPrice.text = [NSString stringWithFormat:@"封顶价：¥ %@",[Utilities changeDoubleToString:model.itemTopPrice]];
    self.ItemGoodsAddPriceRange.text = [NSString stringWithFormat:@"加价幅度：¥ %@",[Utilities changeDoubleToString:model.itemAddPriceRange]];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self.itemMainImage pp_clipCorners:UIRectCornerAllCorners radius:5];
    });
    
}

@end
